<div id="header">
	<h1>
		<a href="/" title="Flextrine">Flextrine</a>
	</h1>
</div><!-- header -->

<div id="content" class="clearfix">

<?php if (isset($successFlash)) { ?>
	<div class="success">
		<?php echo $successFlash; ?>
	</div>
<?php } ?>

<?php if (isset($errorFlash)) { ?>
	<div class="error">
		<?php echo $errorFlash; ?>
	</div>
<?php } ?>

<div id="main">

	<div id="generate" class="action g1">
		<h2><a href="?action=generate&furl=<?php echo $furl; ?>">Generate AS3 Classes</a></h2>
		<p class="description">
			Click here to generate AS3 classes from your PHP entities.
			<br/><br/>
			<input type="checkbox" selected="true" disabled="true"> Generate children</input>&nbsp;&nbsp;
			<input type="checkbox" selected="true" disabled="true"> Generate collection helpers</input>&nbsp;&nbsp;
		</p>
	</div>
	
	<br />

	<div id="create" class="action c1">
		<h2><a href="?action=create&furl=<?php echo $furl; ?>">Create Schema</a></h2>
		<p class="description">
			Click here to generate the schema and apply it to your database.
		</p>
	</div>


	<div id="update" class="action u1">
		<h2><a href="?action=update&furl=<?php echo $furl; ?>">Update Schema</a></h2>
		<p class="description">
			Click here to update the schema with any changes to your entities.
		</p>
	</div>


	<div id="delete" class="action d1">
		<h2><a href="?action=drop&furl=<?php echo $furl; ?>" onclick="javascript:return confirm('This will delete all tables in the database.  Are you sure you want to do this?')">Drop Schema</a></h2>
		<p class="description">
			Click here to drop the schema from your database.
		</p>
	</div>

</div><!-- main -->


<div id="sidebar">

<div class="chunk">
	<h3>Flextrine Project URL</h3>
	
	<form id="furlForm" action="<?php echo $_SERVER['PHP_SELF']; ?>">
		<input name="furl" value="<?php echo $furl; ?>" />
		<a href="#" onclick="document.getElementById('furlForm').submit(); return false;">Click to refresh</a>
	</form>

</div>

<?php if (isset($dbname)) { ?>
	<div class="chunk">
		<h3>Current Database</h3>
	
		<p>	You are currently working with a database called
	
		<span class="databasename"><?php echo $dbname; ?></span>
	
		any changes you make will apply to this one, so stay frosty.</p>
	</div>
<?php } ?>

<?php if (isset($entitiesList)) { ?>
	<div class="chunk">
		<h3>Persistent Entities</h3>
			<ul>
				<?php echo $entitiesList; ?>
			</ul>
	</div>
<?php } ?>

<div class="chunk">
	<h3>About Flextine</h3>
	<p>
Flextrine is developed by Dave Keen (<a href="http://www.actionscriptdeveloper.co.uk">blog and portfolio</a>).
Flextrine documentation is available at <a href="http://www.flextrine.com">www.flextrine.com</a>.
The Flextrine Manager was designed by Ed Dowding (<a href="http://www.eddowding.com/blog/">blog</a>)<br/>.
</p>
</div>

</div><!-- sidebar -->

</div><!-- content -->